<xsl:stylesheet version="1.1"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink"
	xmlns="http://www.w3.org/2000/svg">
	<xsl:template match="interaction[@id='rotate']" mode="output-defs" priority="0">

		<g>
			<defs>
				<g id="spike">
					<polygon points="0,-12 -2,0 0,0" class="compass-rose-spike-left" />
					<polygon points="0,-12 2,0 0,0" class="compass-rose-spike-right" />
					<polygon points="0,-12 -2,0 2,0" class="compass-rose-spike-outline" />
				</g>
				<g id="small-spike">
					<polygon points="0,-8 -2,0 0,0" class="compass-rose-spike-left" />
					<polygon points="0,-8 2,0 0,0" class="compass-rose-spike-right" />
					<polygon points="0,-8 -2,0 2,0" class="compass-rose-spike-outline" />
				</g>
				<marker id="Triangle" viewBox="0 0 10 10" refX="2" refY="5"
					markerUnits="strokeWidth" markerWidth="6" markerHeight="4.5"
					orient="auto">
					<path d="M 0 0 L 10 5 L 0 10 z" />
				</marker>
				<g id="rotate-arrow">
					<path d="M-5,3 C-5,-3 2,-1 5,3" class="compass-rose-arrow"
						transform="translate(0,-14)" marker-end="url(#Triangle)" />
				</g>
			</defs>
			<g transform="translate(0,3)">
				<circle cx="0" cy="0" r="8" class="compass-rose-outer" />
				<use xlink:href="#spike" transform="rotate(0)" />
				<use xlink:href="#spike" transform="rotate(90)" />
				<use xlink:href="#spike" transform="rotate(180)" />
				<use xlink:href="#spike" transform="rotate(270)" />
				<use xlink:href="#small-spike" transform="rotate(45)" />
				<use xlink:href="#small-spike" transform="rotate(135)" />
				<use xlink:href="#small-spike" transform="rotate(225)" />
				<use xlink:href="#small-spike" transform="rotate(315)" />
				<circle cx="0" cy="0" r="3" class="compass-rose-centre" />
				<circle cx="0" cy="0" r="1" class="compass-rose-inner" />
				<text x="0" y="-13" text-anchor="middle" class="compass-rose-text">N</text>
				<g>
					<use xlink:href="#rotate-arrow" transform="rotate(90)" />
					<use xlink:href="#rotate-arrow" transform="rotate(270)" />
				</g>
			</g>
		</g>
	</xsl:template>
</xsl:stylesheet>